import java.util.Scanner;

public class Seventh {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个十进制的数：");
        int num = sc.nextInt();
        StringBuffer buffer = new StringBuffer();//用来装除出来的余数
        StringBuffer buffer1 = new StringBuffer();//装倒序的余数
        int yushu;
        int aa = num;
        while(true){
            yushu = aa % 2;
            buffer.append(yushu);
            aa = aa / 2;
            if(aa == 0){
                break;
            }
        }
        for(int i=buffer.length()-1;i>=0;i--){
            buffer1.append(buffer.charAt(i));
        }
        System.out.println("二进制转换结果为："+buffer1);
    }
}
